package com.alpha.eceasy.mall.api.entity;

import com.alpha.eceasy.extension.BaseFormInfo;
import com.alpha.eceasy.mall.api.dto.MallCommodityDTO;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.beans.BeanUtils;

import java.io.Serial;

/**
 * @author huangpengfei
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName("mall_commodity_detail")
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Schema(description= "商品详情表")
public class MallCommodityDetail extends BaseFormInfo<MallCommodityDetail> {
    @Serial
    private static final long serialVersionUID = 641655770L;

    @Schema(description =  "主图轮播图")
    private String detailCover;

    @Schema(description =  "主图视频")
    private String video;

    @Schema(description =  "商品id")
    private String commodityGuid;
    @Schema(description =  "详情图")
    private String content;

	@Schema(description =  "说明图")
	private String instruction;

    public MallCommodityDetail(MallCommodityDTO dto) {
        BeanUtils.copyProperties(dto, this);
    }
}